<div id="lb_login">
<div class="login_box">
<p class="login_fail" id="ajax_login_fail"></p>
<div class="login_form">
<form id="ajaxLoginForm">
<dl>
<dd>用户名：</dd>
<dt>
<input type="text" name="email_name" class="text">
</dt>
<dd>密　码：</dd>
<dt>
<input type="password" name="pass" class="text">
</dt>
<dd>&nbsp;</dd>
<dt class="rem">
<input type="checkbox" name="remember" class="checkbox" checked="checked" value="1209600">
记住我（两周免登陆）
</dt>
<dd>&nbsp;</dd>
<dt>
<input type="submit" value="" class="login_btn" id="ajax_login_btn">
<a href="/user.php?action=forgetpassword">忘记密码？</a>
</dt>
<input name="rhash" value="<!--dynamic getRHash-->" type="hidden"/>
</dl>
</form>
</div>
<div class="reg_or_weibo">
<div class="register_box">还没有最旅帐号？<a href="/user.php?action=register" class="reg_btn"></a></div>
<div class="l_o"></div>
</div>
</div>
</div>
<script type="text/javascript">
jQuery(function($){
$("#ajaxLoginForm").submit(function(){
var form = this;
$("#ajax_login_fail").html("");
var uname = $.trim(this.email_name.value);
if(uname == '')
{
$("#ajax_login_fail").html(LANG.user_name_require);
this.email_name.focus();
return false;	
}

if($.trim(this.pass.value) == '')
{
$("#ajax_login_fail").html(LANG.user_pass_require);
this.pass.focus();
return false;	
}

$("#ajax_login_btn").attr("disabled",true);
$.ajax({ 
url: SITE_PATH+"user.php?action=ajax_login",
type: "POST",
data:$(form).serialize(),
cache:false,
dataType:'json',
success:function(result){
$("#ajax_login_btn").attr("disabled",false);
if(result.status == 0)
$("#ajax_login_fail").html(LANG.login_error1);
else
{
USER_ID = result.uid;
$.weeboxs.close();
location.href = location.href;
}
},
error:function(){
$("#ajax_login_btn").attr("disabled",false);
$("#ajax_login_fail").html(LANG.login_error);
}
});

return false;
});
});
</script>